package indi.yuluo.service;

import indi.yuluo.entity.DTO.UserCommentsWithSignatureDto;
import indi.yuluo.entity.discussion.Discussion;
import io.swagger.models.auth.In;

import java.util.List;
import java.util.Map;

/**
 * @Author: yuluo
 * @CreateTime: 2022-08-21  20:27
 * @Description: TODO
 */
public interface DiscussService {
    Integer getDiscussNumByProblemId(String pid);

    List<UserCommentsWithSignatureDto> getDiscussInfoByPId(Long pid);

    /**
     * 保存用户评论信息
     * @param currentProblemId
     * @param token
     * @param content
     * @return
     */
    boolean saveComments(Long currentProblemId, String token, String content);

    /**
     * 用户点赞
     * 可以反复点击，已经点赞过了，再次点击取消，未点则加入
     * @param did
     * @param token
     * @return
     */
    Map<Boolean, Integer> like(Long did, String token);

    /**
     * 查询用户点赞状态
     * @param did
     * @param token
     * @return
     */
    boolean checkLikesStatus(Long did, String token);

    int del(Long did, String token);

    Discussion getDiscussById(Long did);

    void deleteById(Long did);
}
